import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import $ from 'jquery'
window.jQuery = $
window.$ = $
// import NProgress from 'nprogress'
// import 'nprogress/nprogress.css'

// import ollama from 'ollama'

// const aiChart = async () => {
//   const response = await ollama.chat({
//     model: 'llama2',
//     messages: [{ role: 'user', content: 'Why is the sky blue?' }]
//   })
//   console.log(response.message.content)
// }
// aiChart()


// marked
import 'marked'
import 'github-markdown-css';
import 'highlight.js/styles/atom-one-dark.css'
import 'highlight.js/lib/common'
import hljsVuePlugin from '@highlightjs/vue-plugin'
import 'highlight.js/styles/dark.css'; // 引入内置样式
Vue.use(hljsVuePlugin)

// const originalResolve = VueRouter.prototype.resolve;
// VueRouter.prototype.pushToTab = function pushToTab(location) {
//   if (!location) return;
//   if (location && typeof location == "string" && location.indexOf("http") != -1)
//     return window.open(location, "_blank");
//   const { href } = originalResolve.call(this, location);
//   window.open(href, "_blank");
// };

// Vue.use(VueRouter);

// ElementUI
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import '@/assets/style.scss';
Vue.use(ElementUI);

// ant-design-vue1.7.8
// import Antd from 'ant-design-vue';
// import 'ant-design-vue/dist/antd.css';
// Vue.use(Antd);

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
